package com.bee2c.pub.home.util;import java.io.PrintWriter;import java.io.StringWriter;import org.springframework.util.StringUtils;public class ExceptionUtil {	public static String getSimpleExInfo(Exception e) {		String msg = e.getMessage();		if(!StringUtils.isEmpty(msg)){			return msg;		}		int depth = 3;		Throwable terr = null;		while(depth > 0 && (terr = e.getCause()) != null) {			msg = terr.getMessage();			if(!StringUtils.isEmpty(msg)){				return msg;			}			depth--;		}		return msg;	}		public static String getDetailExInfo(Exception e) {		StringWriter sw = new StringWriter();		PrintWriter pw = new PrintWriter(sw, true);		e.printStackTrace(pw);		return sw.toString();	}}